<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.ncp.model.biz.index.*"%>
<%@page import="com.ncp.model.entity.index.NaviBean"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
ArrayList al=new NaviManager().getAllNavi();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
  </head>
  
  <body>
    <table border="1" align="center">
    	<tr>
    		<td>ID</td>
       		<td>名称</td>
       		<td>连接</td>
       		<td>删除</td>
       		<td>修改</td>
    	</tr>
    	<%
    	for(int i=0;i<al.size();i++){
    		NaviBean nb=(NaviBean)al.get(i); 
    		%>
    		<tr>
    		<td><%=nb.getId() %></td>
    		<td><%=nb.getName() %></td>
    		<td><%=nb.getUrlpage() %></td>
    		<td><a href="NaviClServlet?type=del&id=<%=nb.getId()%>" onclick="return window.confirm('您确认要删除该菜单吗？')">删除菜单</a></td>
    		<td><a href="NaviClServlet?type=update&id=<%=nb.getId()%>">更改菜单</a></td>
    	 </tr>
    		<%
    	}
    	%>
    </table>
    <hr/>
    <head>添加新导航菜单：</head>
    <form action="NaviClServlet" method="post">	
    	<input type="hidden" name="type" value="addNavi">
    	名称：<input type="text" name="name"/><br/>
		链接：<input type="text" name="urlpage"/><br/>
		<input type="submit" value="确定"/>
    </form>
  </body>
</html>
